/*
 * Copyright 2021 ThoughtWorks, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
.frame-container {
  position: relative;

  iframe {
    height: 100%;
    width:  100%;
    border: 0;
  }

  .loading-overlay {
    display:    none;
    width:      auto;
    height:     auto;
    text-align: center;
    background: #fff;
    position:   absolute;
    top:        0;
    right:      0;
    bottom:     0;
    left:       0;
    z-index:    20;

    .loading-message {
      position:    relative;
      font-size:   14px;
      font-weight: 300;
      top:         calc(50% + 60px);
    }

    .loading-message, .analytics-title, .loading-sub {
      display: block;
    }

    .loading-sub::after {
      display:  inline-block;
      content:  "\2026";
      width:    0; // don't affect text centering
      overflow: visible;
    }
  }

  &.loading-analytics {
    .loading-overlay {
      display: block;
    }
  }
}

$modal-header-height: 55px;
$modal-border-adj: 2px;

.reveal.analytics-modal {
  min-width:  850px;
  width:      50vw;
  height:     calc(525px + #{$modal-header-height} + #{$modal-border-adj});
  overflow-y: hidden;

  .modal-body {
    padding:    0;
    max-height: unset;
    height:     525px;
    overflow-y: auto;
  }

  .frame-container {
    height: 525px;
    width:  100%;

    iframe {
      width:  100%;
      height: 100%;
      border: 0;
    }
  }
}

